home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / cosmicfozmik.swf / scripts / frame_7 / PlaceObject2_179_81 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2007-09-27  |  2.2 KB  |  100 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.gameOn == 1 && _root.gameOver == 0)
  3.    {
  4.       scoreCount++;
  5.    }
  6.    if(_root.gameOver == 1 && accumulated == 0)
  7.    {
  8.       _root.score += 200 * _root.lives;
  9.       accumulated = 1;
  10.    }
  11.    if(scoreCount >= 30)
  12.    {
  13.       _root.score += 20;
  14.       scoreCount -= 30;
  15.    }
  16.    if(_root.lives <= 0)
  17.    {
  18.       _root.gameOn = 0;
  19.       _root.music.stop();
  20.    }
  21.    if(_root.invincTimer > 0)
  22.    {
  23.       _root.invincMiniTimer = _root.invincMiniTimer + 1;
  24.       _root.invincTimer--;
  25.    }
  26.    if(_root.invincMiniTimer == 10)
  27.    {
  28.       _root.setAlphaAlive(50);
  29.    }
  30.    if(_root.invincMiniTimer == 20)
  31.    {
  32.       _root.setAlphaAlive(0);
  33.       _root.invincMiniTimer = 0;
  34.    }
  35.    if(_root.invincTimer <= 0)
  36.    {
  37.       _root.setAlphaAlive(0);
  38.       _root.invincibility = 0;
  39.       _root.invincMiniTimer = 0;
  40.    }
  41.    if(phase == 2)
  42.    {
  43.       _root.groundSpeed = 7;
  44.       _root.blockMax -= 10;
  45.    }
  46.    if(phase == 3)
  47.    {
  48.       _root.groundSpeed = 9;
  49.       _root.blockMax -= 5;
  50.    }
  51.    if(_root.gameOn == 1)
  52.    {
  53.       blockTick++;
  54.       if(blockTick >= _root.blockMax && _root.phase != 4)
  55.       {
  56.          howMany = random(3);
  57.          i = 0;
  58.          while(i < howMany)
  59.          {
  60.             _root.block.duplicateMovieClip("block" + _root.blockCount,_root.i + 2500);
  61.             _root["block" + _root.blockCount]._y = random(300) + 50;
  62.             _root["block" + _root.blockCount]._x = 700;
  63.             _root.blockCount = _root.blockCount + 1;
  64.             _root.i = _root.i + 1;
  65.             blockTick = 0;
  66.             i++;
  67.          }
  68.       }
  69.    }
  70.    if(_root.phase == 4 && blockTick >= _root.blockMax * 3)
  71.    {
  72.       _root.sendStar();
  73.       blockTick = 0;
  74.    }
  75.    if(_root.spikeCount >= 100)
  76.    {
  77.       _root.spikeCount = 0;
  78.    }
  79.    if(_root.stars2Count >= 100)
  80.    {
  81.       _root.stars2Count = 0;
  82.    }
  83.    if(_root.blockCount >= 100)
  84.    {
  85.       _root.blockCount = 0;
  86.    }
  87.    if(_root.groundCount >= 100)
  88.    {
  89.       _root.groundCount = 0;
  90.    }
  91.    if(_root.ceilingCount >= 100)
  92.    {
  93.       _root.ceilingCount = 0;
  94.    }
  95.    if(_root.starsCount >= 100)
  96.    {
  97.       _root.starsCount = 0;
  98.    }
  99. }
  100.